//
//  FKMainVC.m
//  LiveDemo1
//
//  Created by xmc06 on 16/10/13.
//  Copyright © 2016年 zmosa. All rights reserved.
//

#import "FKMainVC.h"
#import "FKCaptureVC.h"
#import "FKBroadcastListVC.h"

@interface FKMainVC ()

@end

@implementation FKMainVC

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    self.title = @"直播功能";
    [self setupSubviews];
}

/**
 *  添加子控件
 */
- (void)setupSubviews
{
    self.view.backgroundColor = [UIColor whiteColor];
    
    UIButton *captureBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.view addSubview:captureBtn];
    captureBtn.frame = CGRectMake(30, 80, 100, 40);
    [captureBtn addTarget:self action:@selector(captureBtnClicked:) forControlEvents:UIControlEventTouchUpInside];
    [captureBtn setTitle:@"采集" forState:UIControlStateNormal];
    captureBtn.backgroundColor = [UIColor colorWithRed:1.0 green:0.2757 blue:0.8718 alpha:1.0];
    
    UIButton *broadcastListBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.view addSubview:broadcastListBtn];
    broadcastListBtn.frame = CGRectMake(150, 80, 100, 40);
    [broadcastListBtn addTarget:self action:@selector(broadcastListBtnClicked:) forControlEvents:UIControlEventTouchUpInside];
    [broadcastListBtn setTitle:@"主播列表" forState:UIControlStateNormal];
    broadcastListBtn.backgroundColor = [UIColor colorWithRed:1.0 green:0.2444 blue:0.9511 alpha:1.0];
}

/**
 *  采集视频
 */
- (void)captureBtnClicked:(UIButton *)button
{
    FKCaptureVC *captureVC = [[FKCaptureVC alloc] init];
    [self.navigationController pushViewController:captureVC animated:true];
}

/**
 *  主播列表
 */
- (void)broadcastListBtnClicked:(UIButton *)button
{
    FKBroadcastListVC *broadcastListVC = [[FKBroadcastListVC alloc] init];
    [self.navigationController pushViewController:broadcastListVC animated:true];
}

@end
